<?php
class Pageley_Tag_Pagelet extends Pageley_Tag_Dispatch implements Pageley_Tag_Parametrizable {
    
    private $pageletParameters;
    
    public function __construct() {
        $this->pageletParameters = new Pageley_Util_ArrayMap();
    }
    
    protected function dispatch($dispatcher, $parameters) {
        $parameters->putAll($this->pageletParameters);
        $dispatcher->dispatchPagelet($parameters);
    }
    
    public function setParameter($name, $value) {
        $this->pageletParameters->put($name, $value);
    }
}